A processing circuit may perform processing operations in units called processing threads. Each processing thread represents a different task to be performed by the processing circuit. For example, a graphics processor may execute a number of processing threads, with each thread corresponding to a particular pixel or group of pixels of an image being processed by the graphics processor.
A processing thread may require resources to be available to the processing circuit before the thread can be executed. For example, the processing circuit may require access to data in a memory or cache, or may require bandwidth to be allocated on a particular piece of hardware in order to execute the thread. Therefore, a thread may request a required resource and then wait for the required resource to become available before it can be processed by the processing circuit.
One problem can arise in such a system when a first thread requests access to a given resource and, before the first thread can use the requested resource, a second thread also requests a resource and this request causes reallocation of the resource requested by the first thread. For example, the first thread may request that data is placed in a cache line of a cache, but before the thread is able to use the data, the second thread may evict the data and reallocate the cache line for its own required data. If the first thread now again requests the required data, this can lead to a problem called thrashing where the first and second threads alternately request the data and each thread's request prevents the other thread from using the required resource, stopping either thread from being processed. The present technique seeks to reduce the amount of reallocation of resources that occurs when processing the threads, so as to reduce the likelihood of thrashing.